/**
 * Created by zhaohenry on 2017/6/12.
 */
import * as types from './mutation-types'

export default {
  // 更新步骤
  [types.UPDATE_STEP] (state, num) {
    state.step.num = num
  },
  // 服务端步骤
  [types.SERVER_STEP] (state, num) {
    state.serverStep.num = num
  },
  // 任务详情
  [types.TASK_INFO] (state, payload) {
    state.taskINFO.id = payload.id
    state.taskINFO.name = payload.name
    state.taskINFO.simulation = payload.simulation
    state.taskINFO.real = payload.real
    state.taskINFO.requirement = payload.requirement
    state.taskINFO.simStep = payload.SDescription
    state.taskINFO.realStep = payload.PDescription
    state.taskINFO.video = payload.video
    state.taskINFO.pdfUrl = payload.course
    state.taskINFO.reportTemp = payload.reportTemp
    state.taskINFO.connectPhoto = payload.connectPhoto
  },
  [types.CURRENT_TASK] (state, payload) {
    state.currentTask.id = payload.id
  }
}
